package main

import "time"

type schedulers interface {
	Doloop()
}

type scheduler struct {
	reg registers
}

func NewScheduler(reg registers) schedulers{
	return &scheduler{reg}
}

func(s *scheduler) check(){
	 s.reg.CheckAndPopup()
	return
}

func(s *scheduler) Doloop(){
	for {
		select {
		case <- time.After(time.Millisecond * 100):
			 s.check()


		}
	}
}